package com.example.userdemo.controller;

import com.example.userdemo.entity.Student;
import com.example.userdemo.service.StudentService;
import org.apache.kafka.common.protocol.types.Field;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author liqinglin
 * @since 2023年07月24日
 */
@RestController
@RequestMapping("/userdemo/student")
public class StudentController {

    @Resource
    private StudentService studentService;

    @GetMapping("/test")
    public List<Student> mpTest(){
        List<Student> students = studentService.getBaseMapper().selectList(null);
        return students;
    }

}
